package com.jzl.swing.dao;

import java.sql.SQLException;
import java.util.List;

import com.jzl.swing.entity.User;

/**
 * 用户管理接口
 * @author zalej
 *
 */
public interface UserDao {
	/**
	 * 添加用户
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public abstract int add(User user)throws SQLException;
	/**
	 * 修改用户
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public abstract int modify(User user)throws SQLException;
	/**
	 * 删除用户
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public abstract int delete(User user)throws SQLException;
	/**
	 * 查询所有用户
	 * @return
	 * @throws SQLException
	 */
	public abstract List<User> queryAll()throws SQLException;
	/**
	 * 通过名字查询用户
	 * @param name
	 * @return
	 * @throws SQLException
	 */
	public abstract User queryByName(String name) throws SQLException;
}
